﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;

public class NpcModel : MonoBehaviour
{
    private string _playerName;
    //private SceneObject _playerObj;

    public string playerName
    {
        get
        {
            return _playerName;
        }
    }
	/*
    public SceneObject playerObj
    {
        get { return _playerObj; }
        set
        {
            _playerObj = value;
            //setPlayerName();
            //setType(_playerObj.Type);
        }
    }
    */
    //暂时写成传值替换
    public void setPlayerName(string nameStr)
    {
        _playerName = nameStr;//SceneUtil.getName(_playerObj);
        //改变显示层显示
    }

    //设置npc类型对应其图标
    public void setType(int type)
    {
        switch (type)
        {
            case 1:
                break;
            case 2:
                break;
        }
        //showIcon();
    }
    /// <summary>
    /// 设置任务npc状态图标
    /// </summary>
    /// <param name="status"></param>
    public void setStatusIcon(int status)
    {
        int frameIndex =0;
        switch (status)
        {
            case GameDefine.NPCStatus_CanSubmit:			// 可提交
                frameIndex = 7;
                break;
            case GameDefine.NPCStatus_UnComplete:			// 未完成
                frameIndex = 8;
                break;
            case GameDefine.NPCStatus_TaskAccept:			// 可接取任务
                frameIndex = 5;
                break;
        }
        showIcon(frameIndex);
    }

    /// <summary>
    /// 设置显示对应材质名
    /// </summary>
    /// <param name="frameIndex"></param>
    private void showIcon(int frameIndex)
    {
        //改变显示层显示
    }
    




}